<extend name="./Common/View/Public/form.html" />
<block name="page_title">编辑用户</block>
<block name="main">
    <form class="layui-form" method="post" action="sys/user/update" lay-filter="pageForm">
        <input type="hidden" name="id" value="{$data.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">账号</label>
            <div class="layui-input-inline">
                <input type="text" name="account" value="{$data.account}" readonly maxlength="30" minlength="2" lay-verify="required|length" placeholder="请输入登录账号" autocomplete="off" class="layui-input" />
            </div>
            <div class="layui-form-mid layui-word-aux">2-30个英文或数字</div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">昵称</label>
            <div class="layui-input-inline">
                <input type="text" name="nickname" value="{$data.nickname}" maxlength="30" minlength="1" lay-verify="required|length" placeholder="请输入用户昵称" autocomplete="off" class="layui-input" />
            </div>
            <div class="layui-form-mid layui-word-aux">1-20个英文或汉字</div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-inline">
                <input type="email" name="email" value="{$data.email}" lay-verify="email" placeholder="请输入用户电子邮箱" autocomplete="off" class="layui-input" />
            </div>
            <div class="layui-form-mid layui-word-aux">1-20个英文或汉字</div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机号</label>
            <div class="layui-input-inline">
                <input type="text" name="mobile" value="{$data.mobile}" lay-verify="phone" placeholder="请输入用户手机号" autocomplete="off" class="layui-input" />
            </div>
            <div class="layui-form-mid layui-word-aux">1-20个英文或汉字</div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">用户状态</label>
            <div class="layui-input-block">
                {:W('Todo/Dict/radio',array('STATUS','status',$data['status']))}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">角色</label>
            <div class="layui-input-block">
                {:W('Todo/Relation/checkbox',array('Todo/Sys/Role','role_id',$data['roles'],'status=1'))}
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="pageForm">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</block>